package com.gis.entity;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.List;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
/* 
 * CREATE TABLE process_table (
    id                  SERIAL PRIMARY KEY,             -- 自增主键

    process_name        VARCHAR(100),                   -- 流程名称
    process_description TEXT,                           -- 流程描述


    insert_time         TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
    updated_time        TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);

COMMENT ON COLUMN process_table.id IS '自增ID';
COMMENT ON COLUMN process_table.process_name IS '流程名称';
COMMENT ON COLUMN process_table.process_description IS '流程描述';
 */
@TableName("process_table")
@Data
@NoArgsConstructor
@AllArgsConstructor
public class ProcessData implements Serializable {
    
    @TableId(type = IdType.AUTO)
    private Long id;
    
    private String processName;
    private String processDescription;

    @TableField(exist = false)
    @JsonDeserialize(as = ArrayList.class)
    private List<NodeData> nodes;

    private Timestamp insertTime;
    private Timestamp updatedTime;

    
}
